




FF1 Disassembly Companion by Joe73ffdq
Nov/13-Feb/14


This document is to use as a reference to find find what you are looking for a little easier.

Because there is so much data to FF1 disassembly, there is bound to be something missing.
I put this together to help me with my work, and it is complete enough to release to everyone.

There are 3 specific things that might cause a lack of full completion.

1. There are many times "V blank" is scattered throughout, and I didnt include them here. 
2. Numerous times "sound" is mentioned, and there were too many to list.
3. Bank 15 has a lot of stuff I dont fully understand, and is the least covered.

I tried my best to put everything in a sensible order, and things should be categorically correct.
Given the degree of data, there are bound to be some minor parts missing, and the possible mismatch in each category.




.............................................X1-Misc
.............................................X2-Weapons and Armor
.............................................X3-Magic and Items
.............................................X4-Class
.............................................X5-Enemy
.............................................X6-Battle
.............................................X7-Maps
.............................................X8-Shop





******************************************************---X1---***********************************************************
*************************************************************************************************************************

_______________________________________________________-Misc-____________________________________________________________
_________________________________________________________________________________________________________________________



PROLOGUE
Prologue text...............................................................................b13-a832--36842
Pointers to the prologue text...............................................................b13-a800--36810
Transition in text?.........................................................................b13-b98d--3799d
Transition out text?........................................................................b13-b93f--3794f
Prologue credit pointers....................................................................b13-bb00--37b10

Prologue/ship game background tileset.......................................................b11-b400--2f410
Prologue/ship game background name table & palette map......................................b11-bc00--2fc10
Load prologue/ship game background..........................................................b15-e8cb--3e8db


INTRO
Do intro text...............................................................................b14-a0ee--3a0fe
Fade in intro text..........................................................................b14-a274--3a284
Intro text!.................................................................................b13-bf20--37f30
Display 'copyright' lines on title screen...................................................b14-8480--38490
Game Start..................................................................................b15-c000--3c010

Reset the game on start.....................................................................b14-84ca--384da
New game/Continue menu......................................................................b14-a156--3a166
Output respond rate.........................................................................b14-a238--3a248
New game/Continue/Respond rate text.........................................................b14-a253--3a263
Default message speed.......................................................................b14-a17b--3a18b


SUBSCREEN
Display subscreen menu......................................................................b14-b911--3b921
Status screen orb images....................................................................b13-b600--37610
Load menu screen tiles and palettes, disp off, clear screen.................................b14-a219--3a229

Status screen text..........................................................................b14-b45a--3b46a
Window coordinates..........................................................................b14-b527--3b537
Menu text pointers..........................................................................b14-8500--38510
Munu Text, and lots of other dialogue.......................................................b14-8580--38590

Font (Letters,Icons, some words, Borders)...................................................b09-8800--24810
Are these usable font characters? or what?..................................................b09-8700--28710
Window stuff................................................................................b15-e063--3e073

5-digit price of item in A..................................................................b14-8e44--38e54
6-digit party gold..........................................................................b14-8e4a--38e5a
3-6 digit various things....................................................................b14-8e5c--38e6c


DIALOG
Talk to sprite X............................................................................b14-902b--3903b
Sprite dialog data..........................................................................b14-95d5--395eb
Sprite dialog handlers......................................................................b14-90d3--390e3
Dialog routines! (sprite behavior, plot points).............................................b14-9296--392a6
Dialog......................................................................................b10-8200--28210
Dialog pointers.............................................................................b10-8000--28010


TRAVEL
Set to walking..............................................................................b15-c5d2--3c5e2
Can board ship..............................................................................b15-c609--3c619
Can canoe...................................................................................b15-c5e6--3c5f6
Try to board airship........................................................................b15-c215--3c225
Stepping on bridge or canal plug............................................................b15-c64d--3c65d

General door handling.......................................................................b15-ce53--3ce63
Close the door behind you...................................................................b15-ce44--3ce54
Do screen shaking (i.e. when getting an orb)?...............................................b15-da4e--3da5e

Restore magic (Inn/house)...................................................................b14-abf3--3ac03
Save........................................................................................b14-ab69--3ab79


SHIP GAME...................................................................................b13-ae10--36e20
Initial positions of the ship game tiles....................................................b13-afb8--36fc8
Ship game tiles (2x2, but only 1 plane).....................................................b13-9e00--35e10
Ship game palettes?.........................................................................b13-bf00--37f10
Check if ship game won......................................................................b13-af5b--36f6b
Won: Add 100 gold...........................................................................b15-c28f--3c29f
Add 100 gold................................................................................b15-c8a4--3c8b4


MUSIC
Music pointers..............................................................................b13-8000--34010
Song data. See music.txt for the format.....................................................b13-80c0--340d0
Offsets of channel data structs.............................................................b13-b091--370a1
Handle music looping........................................................................b13-b217--37227
Load period, duration, octave, ect..........................................................b13-b250--37260


ENDING
Do ending!..................................................................................b13-b803--37813
Load the top half of a palette map (windowing?).............................................b13-b899--378a9
Upload ending background....................................................................b15-e89c--3e8ac
Ending background tileset...................................................................b11-a800--2e810
Ending background name table & palette map..................................................b11-b000--2f010
Ending palettes?............................................................................b13-bf10--37f20


Pen movement data for "The End" fancyness...................................................b13-a000--36010
Display the end fancyness!!.................................................................b13-a400--36410
Whether to fill each row of pixels for the fancyness........................................b13-a594--365a4
Move the pen according to A (RDLU) and set the new pixel....................................b13-a5e4--365f4
Ending fancyness palette map................................................................b13-a639--36649
The tables below translate an X,Y position into a byte index for the pixel..................b13-a681--36691

Ending text.................................................................................b13-a8e3--368f3
Pointers to the ending text.................................................................b13-a808--36818
Programmed by Nasir.........................................................................b13-bb08--37b18



******************************************************---X2---***********************************************************
*************************************************************************************************************************

_______________________________________________-Weapons and Armor-_______________________________________________________
_________________________________________________________________________________________________________________________


Weapon Data.................................................................................b12-8000--30010
Who can equip...............................................................................b14-bf50--3bf60
Weapon graphics.............................................................................b09-a800--26810

Armor data..................................................................................b12-8140--30150
Who can equip...............................................................................b14-bfa0--3bfb0
Equip armor at $300,$10 on warrior with bit in W[$14].......................................b14-bc69--3bc79
Warrior bits, in LSB order?.................................................................b14-bcb9--3bcc9
Armor type bytes............................................................................b14-bcd1--3bce1


Prepare to equip weapon/armor...............................................................b14-bba9--3bbb9
Prepare to equip weapon/armor...............................................................b14-bc0a--3bc1a
Equip weapon at $300,$62 on warrior of class................................................b14-bc30--3bc40
Clear "E-"..................................................................................b15-ed08--3ed18
Equipped? Load "E-".........................................................................b15-edf4--3ee04


Item/Weapon/Armor/GoldItem/Magic/Class text.................................................b10-b900--2b910
Item/Weapon/Armor/GoldItem/Magic/Class text pointers........................................b10-b700--2b710

Move all weapons/armors to the start of their 4-bytes (which in $66)........................b14-bad7--3bae7
Draw weapon/armor window (which is spec'd by $66)...........................................b14-bada--3baea
Copy weapon/armor data ($66 selects) from warrior structs to $0300..........................b14-badd--3baed
Clear weapon/armor stats (which in $66) for all warriors, and ret to bank 14................b14-bae0--3baf0
X = first open weapon slot, C set if none...................................................b14-dd34--3dd44

Weapon/armor screen main loop...............................................................b14-bbbe--3bbce
Do weapon/armor screen cursor movement......................................................b14-bd6e--3bd7e
Draw weapon/armor window (which is spec'd by $66)...........................................b14-bdf3--3be03
Draw weapon/armor window A..................................................................b14-be5e--3be6e
Weapon/armor window positions...............................................................b14-be7c--3be8c
Copy weapon/armor data ($66 selects) from warrior structs to $0300..........................b14-bd9d--3bdad
Draw weapon/armor names for weapon/armor screen.............................................b15-ecda--3ecea
Move all weapons/armors to the start of their 4-bytes (which in $66)........................b15-effc--3f00c



******************************************************---X3---***********************************************************
*************************************************************************************************************************

_________________________________________________-Magic and Items-_______________________________________________________
_________________________________________________________________________________________________________________________



Starting gold, items........................................................................b00-b010--03020
Clamp to 999999.............................................................................b11-9b55--2db65
Clamp to 999999.............................................................................b11-9be5--2dbf5
Clamp to 999999.............................................................................b11-9e23--2de33
1000000 (Gold and Exp Cap)..................................................................b11-99a3--2d9b3


ITEMS
Item screen.................................................................................b14-b11d--3b12d
Item effects................................................................................b14-b177--3b187
Tent........................................................................................b14-b284--3b294
Cabin.......................................................................................b14-b2a1--3b2b1
House.......................................................................................b14-b2be--3b2ce
Heal potion.................................................................................b14-b301--3b311
Pure potion.................................................................................b14-b338--3b348
Soft potion.................................................................................b14-b360--3b370

Cure warrior $62 status in $10..............................................................b14-b388--3b398
Item screen movement........................................................................b14-b5ac--3b5bc
Cursor point at menu screen character.......................................................b14-b7a9--3b7b9
Cursor Y positions for menu screen menu.....................................................b14-b7e1--3b7f1
Cursor positions for item screen............................................................b14-b7e6--3b7f6
Positions of each item on the item screen...................................................b15-efcc--3efdc


MAGIC
Magic Data..................................................................................b12-81e0--301f0
Enemy special...............................................................................b12-83f0--30400

Effect 00: Display "ineffective" message....................................................b12-b894--338a4
Effect 01: damaging magic...................................................................b12-b899--338a9
Effect 02: Damage undead....................................................................b12-b905--33915
Effect 03: Apply status ailment.............................................................b12-b92f--3393f
Effect 04: hit multiplier down..............................................................b12-b95e--3396e
Effect 05: "courage" down...................................................................b12-b979--33989
Effect 07: HP up............................................................................b12-b999--339a9
Effect 08: Cure status ailment..............................................................b12-b9cd--339dd
Effect 09: Absorb up........................................................................b12-b9e4--339f4
Effect 0a: Grant elemental resistance.......................................................b12-b9f4--33a04
Effect 0b: Damage up........................................................................b12-ba00--33a10
Effect 0c: hit multiplier up................................................................b12-ba10--33a20
Effect 0d: Hit% and damage up...............................................................b12-ba28--33a38
Effect 0e: Evade down.......................................................................b12-ba46--33a56
Effect 0f: CUR4.............................................................................b12-ba68--33a78
Effect 10: Evade up.........................................................................b12-ba73--33a83
Effect 11: Remove elemental resistance......................................................b12-ba94--33aa4
Effect 12: Apply status if not strong and HP<300............................................b12-bad7--33ae7

Calc magic hit rate, base damage, and hit roll..............................................b12-b82d--3383d
Cure/cur2/cur3/cur4.........................................................................b14-aef9--3af09
Heal/hel2/hel3..............................................................................b14-af15--3af25
Pure/life/lif2..............................................................................b14-af2a--3af3a
Warp/soft/exit..............................................................................b14-af3f--3af4f

Cure/cur2/cur3 routine......................................................................b14-af5c--3af6c
Cur4 routine................................................................................b14-afad--3afbd
Heal/hel2/hel3 routine......................................................................b14-afdc--3afec
Life routine................................................................................b14-b018--3b028
Lif2 routine................................................................................b14-b047--3b057
Pure routine................................................................................b14-b07d--3b08d
Soft routine................................................................................b14-b0a7--3b0b7
Warp routine................................................................................b14-b0d1--3b0e1
Exit routine................................................................................b14-b0f2--3b102

Class magic learning ability pointers.......................................................b14-ad00--3ad10
Who can use what magic......................................................................b14-ad18--3ad28
Check if a magic charge is available........................................................b14-b102--3b112
Restore HP (amount in A) for all warriors...................................................b14-b53f--3b54f



Item/Weapon/Armor/GoldItem/Magic/Class text.................................................b10-b900--2b910
Item/Weapon/Armor/GoldItem/Magic/Class text pointers........................................b10-b700--2b710
Attack text.................................................................................b10-b634--2b644
Attack text pointers........................................................................b10-b600--2b610
Magic screen................................................................................b14-ae97--3aea7


Out-of-battle magic target select...........................................................b14-b3a0--3b3b0
Show out-of-battle magic target select screen cursor........................................b14-b3ee--3b3fe
Display out-of-battle magic target select screen............................................b14-b400--3b410
X positions for out-of-battle magic target select screen cursor.............................b14-b3fc--3b40c
Display out-of-battle magic target select screen............................................b14-b400--3b410
Display out-of-battle magic target select text data.........................................b14-b452--3b462
Display out-of-battle magic message ........................................................b14-b92b--3b93b
Magic screen cursor movement................................................................b14-b6dd--3b6ed
Set cursor for magic screen.................................................................b14-b816--3b826
Window positions for out-of-battle magic screen.............................................b14-baa2--3bab2


Graphics....................................................................................b09-ab00--26b10



******************************************************---X4---***********************************************************
*************************************************************************************************************************

______________________________________________________-Class-____________________________________________________________
_________________________________________________________________________________________________________________________



STARTING STATS 
Class starting stats........................................................................b00-b040--03050
Stat for warrior $67 as string..............................................................b14-8d70--38d80
Starting stats..............................................................................b15-c031--3c041
Copy initial stats for each warrior.........................................................b15-c76d--3c77d


EXPERIENCE AN GOLD
Initial exp = 40............................................................................b15-c04c--3c05c
Exp for each level..........................................................................b11-9000--2d010

Calculate experience gained ................................................................b11-9b25--2db35
At least 1 exp per warrior..................................................................b11-9b3b--2db4b
Add experience and gold.....................................................................b11-9ae5--2daf5
Add experience and gold.....................................................................b11-9b14--2db24
Calculate gold gained.......................................................................b11-9b3e--2db4e
Add gold to total...........................................................................b11-9b4d--2db5d

1000000 (Gold and Exp Cap)..................................................................b11-99a3--2d9b3
Clamp to 999999.............................................................................b11-9b55--2db65
Clamp to 999999.............................................................................b11-9be5--2dbf5
Clamp to 999999.............................................................................b11-9e23--2de33

Add exp and level...........................................................................b11-9bb0--2dbc0
Exp for level up............................................................................b11-9b85--2db95
Exp for level up............................................................................b11-9be8--2dbf8
Exp for level up............................................................................b11-9c01--2dc11
Add exp.....................................................................................b11-9bd8--2dbe8
Add exp for warrior 1-4.....................................................................b11-9b6d--2db7d
Add exp and level...........................................................................b11-9b7f--2db8f
Update exp-to-next-level....................................................................b11-9b88--2db98


LEVEL UP
Level up data...............................................................................b11-9094--2d0a4
Level up data pointer table.................................................................b11-9df4--2de04

Do level up, if appropriate.................................................................b11-9bf0--2dc00
Do level up!!...............................................................................b11-9c14--2dc24
Level 50 already? Return....................................................................b11-9c14--2dc24
Level++.....................................................................................b11-9c1f--2dc2f
Level up data for this class & level........................................................b11-9c27--2dc37
Get class...................................................................................b11-9c48--2dc58
Level = Actual level number.................................................................b11-9a3e--2da4e
Actual level number to level-1 used outside of battle.......................................b11-9a85--2da95


STATS UP
Stats up....................................................................................b11-9cf3--2dd03
display stat up, if up......................................................................b11-9d84--2dd94
Inc if bit set or 25% chance................................................................b11-9d06--2dd16
Increase stat, clamp to 99..................................................................b11-9d22--2dd32

Str up and now even -> inc damage (clamp 200)...............................................b11-9d37--2dd47
Agi up -> inc evade (clamp to 200)..........................................................b11-9d50--2dd60
Agility+Luck/8 for lead warrior.............................................................b12-93db--313eb
Vit/4+1, + [20..25] if strong...............................................................b11-9cb6--2dcc6

Add Hit%....................................................................................b11-9c50--2dc60
Clamp A to 200..............................................................................b11-9c58--2dc68
Add Mag Def.................................................................................b11-9c5d--2dc6d
Clamp A to 200..............................................................................b11-9c65--2dc75
Hit% gain on level up per class.............................................................b11-9ddc--2ddec
Clamp A to 200..............................................................................b11-9e1c--2de2c
MDef gain on level up per class.............................................................b11-9de8--2dfd8


HIT POINTS / MAGIC POINTS
HP up.......................................................................................b11-9caf--2dcbf
HP gain calculated above....................................................................b11-9cdb--2dceb
Max HP......................................................................................b11-9ce3--2dcf3
1000 (HP Cap)...............................................................................b11-99a6--2d9b6
Clamp to 999................................................................................b11-9cf0--2dd00
Clamp to 999................................................................................b11-9e47--2de57
Strong HP gain minimum......................................................................b11-9cc7--2dcd7
Strong HP gain maximum......................................................................b11-9cc9--2dcd9

Starting magic charges......................................................................b15-c7d5--3c7e5
Only give starting magic to RM/WM/BM (not even wizards).....................................b15-c7cd--3c7dd
Offset of each spell slot in player magic struct............................................b15-df90--3dfa0
MP all other classes Max....................................................................b11-9c95--2dca5
MP Kn/Ni Max................................................................................b11-9c99--2dca9
Skip granting magic for Fi/Th...............................................................b11-9c6a--2dc7a
Load magic charge increase flags............................................................b11-9c73--2dc83
Add a charge................................................................................b11-9c7d--2dc8d
Clamp to max................................................................................b11-9c8a--2dc9a

Pointer to magic data for warrior...........................................................b11-99e8--2d9f8
Pointer to magic data for warrior...........................................................b11-9a3b--2da4b
Change out-of-battle spell numbers (1-8) to global 1-64 spell numbers.......................b11-9a41--2da51
Pointer to magic data for warrior...........................................................b11-9a82--2da92
Convert global 1-64 spell numbers to per-level 1-8 numbers..................................b11-9a88--2da98
Warrior Y magic data........................................................................b11-9bc1--2dbd1


WEAPONS / ARMOR / EQUIPS
Warrior weapon..............................................................................b15-df44--3df54
Warrior armor...............................................................................b15-df58--3df68
Warrior magic...............................................................................b15-df6f--3df7f

Apply weapon/armor equips...................................................................b14-a454--3a464
Apply weapon/armor equips (which in $66)....................................................b15-eeb1--3eec1
Clear weapon/armor stats (which in $66) for all warriors, and ret to bank 14................b15-ed92--3eda2
Remove Damage/Hit%/Evade bonus..............................................................b15-eda6--3edb6
Zero Warrior $17's Absorb/Elem Resist, or Damage for BB/MA (which in $66)...................b15-edc1--3edd1
Zero Warrior $17's Absorb/Elem Resist, or Damage for BB/MA .................................b15-eeb7--3eec7

Apply BB/Ma bare bonuses....................................................................b11-9d62--2dd72
Apply BB/Ma bare bonuses....................................................................b11-9966--2d976
Do BB/Ma bare bonuses.......................................................................b15-ee4a--3ee5a
Do BB/Ma bare bonuses.......................................................................b15-eedb--3eeeb
Scan for equipped weapon....................................................................b11-9973--2d983
Nothing equipped, damage = Level*2..........................................................b11-9988--2d998
Absorb = Level..............................................................................b11-998a--2d99a
and critical% = level*2 and #hits *= 2......................................................b12-adbf--32dcf
BB/Ma bare handed weapon Pal/GFX............................................................b12-adbb--32dcb


CLASS SELECTION / CLASS CHANGE
Name screen string..........................................................................b14-a011--39021
Information for class screen setup..........................................................b14-a0ae--390be

Perform class change........................................................................b14-95ae--395be
Do class selection screen...................................................................b14-9c54--39c64
Output BG for class selection screen........................................................b14-9cf8--39d08
Setup class selection screen sprites........................................................b14-9e33--39e43
Name screen cursor..........................................................................b14-9e4e--39e5e
Draw windows for class selection screen.....................................................b14-9e90--39ea0
Output names and class names for class selection screen.....................................b14-9ebc--39ecc
Setup sprites for the 4 warriors............................................................b14-9f4e--39f5e
Draw name for warrior in $67 for name screen................................................b14-9f7d--39f8d
Draw name screen............................................................................b14-9fb0--39fc0


TEXT
Item/Weapon/Armor/GoldItem/Magic/Class text.................................................b10-b900--2b910
Item/Weapon/Armor/GoldItem/Magic/Class text pointers........................................b10-b700--2b710


GRAPHICS AND PALETTES
Warrior battle pics.........................................................................b09-9000--25010
Setup player graphics?......................................................................b12-9724--31734
Character status graphics...................................................................b12-9db2--31dc2

Warrior palettes by class...................................................................b12-a03c--3204c
Load palette and do GFX?....................................................................b12-a32d--3233d
Character battle palettes...................................................................b15-eba5--3ebb5
Character battle palette selection..........................................................b15-eca4--3ecb4


STRUCTS
Convert out-of-battle data to in-battle data................................................b11-99dd--2d9ed
Convert out-of-battle data to in-battle data................................................b11-9a2a--2da3a
Convert out-of-battle status (in A) to in-battle status.....................................b11-9a38--2da48
Convert out-of-battle status (in A) to in-battle status.....................................b11-9aa6--2dab6
Conversion from out-of-battle status to in-battle status....................................b11-9ab4--2dac4

Convert in-battle data to out-of-battle data................................................b11-9a71--2da81
Convert in-battle data to out-of-battle data................................................b11-9ac5--2dad5
Convert in-battle status (in A) to out-of-battle status.....................................b11-9a7f--2da8f
Convert in-battle status (in A) to out-of-battle status.....................................b11-9aad--2dabd
Conversion from in-battle status to out-of-battle status....................................b11-9ab8--2dac8

Warrior A structs: p[$82]=permanent, p[$80]=in-battle.......................................b12-9382--31392
Warrior A structs: p[$82]=permanent, p[$80]=in-battle.......................................b12-947d--3148d
Warrior A structs: p[$82]=permanent, p[$80]=in-battle.......................................b12-a3ba--323ca
Warrior A structs: p[$82]=permanent, p[$80]=in-battle.......................................b12-a3dd--323ed
Warrior A structs: p[$82]=permanent, p[$80]=in-battle.......................................b12-a434--32444
Warrior A structs: p[$82]=permanent, p[$80]=in-battle.......................................b12-a486--32496
Warrior A structs: p[$82]=permanent, p[$80]=in-battle.......................................b12-a4bf--324cf

Player struct pointers......................................................................b11-9e0c--2de1c
Player struct pointers......................................................................b12-9f5d--31f6d
Set pointers for warrior A: p[$82]=permanent, p[$80]=in-battle..............................b12-a145--32155
Addresses of player structs.................................................................b12-b674--33684

Warrior Y permanent struct..................................................................b11-9bb7--2dbc7
Warrior 1-4 permanent data..................................................................b11-9e0c--2de1c
Warrior 1-4 magic data......................................................................b11-9e14--2de24
Warrior 1-4 in-battle struct................................................................b12-9f65--31f75
Warrior 1-4 permanent struct................................................................b12-9f5d--31f6d
Warrior 1-4 magic?..........................................................................b12-9f6d--31f7d

Clamp XY to 255 and Clamp XY to 0...........................................................b12-a4aa--324ba
w[1]=clamp255(w[1]+4).......................................................................b12-a6c6--326d6
Clamp XY to 255.............................................................................b12-a6e7--326f7
Clamp XY to 0...............................................................................b12-a827--32837
w[0]=clamp255(w[0]+40)......................................................................b12-a6c3--326e3
Roll 200 = always miss......................................................................b12-a7f2--32802
D = D .. 2*D, clamp to 255..................................................................b12-a801--32811
If roll <= hit chance, hit..................................................................b12-a80b--3281b



******************************************************---X5---***********************************************************
*************************************************************************************************************************

______________________________________________________-Enemy-____________________________________________________________
_________________________________________________________________________________________________________________________


Enemy Data..................................................................................b12-8520--30530
AI Data.....................................................................................b12-9020--31030
Palettes....................................................................................b12-8f20--30f30
Fiend tilemaps and palettes.................................................................b11-92e0--2d2f0
Chaos tilemap and palettes..................................................................b11-9420--2d430


Enemy names.................................................................................b11-95e0--2d5f0
Enemy name pointers.........................................................................b11-94e0--2d4f0



******************************************************---X6---***********************************************************
*************************************************************************************************************************

______________________________________________________-Battle-___________________________________________________________
_________________________________________________________________________________________________________________________


PATTERNS
Battle Data.................................................................................b11-8400--2c410
Battle pattern tables.......................................................................b07-8000--1c010
Battle pattern tables, part 2...............................................................b08-8000--20010


FORMATION
PRNG table #1...............................................................................b15-fcf1--3fd01
PRNG table #2...............................................................................b15-f100--3f110
Cycle PRNG for randomness ; A = RND (0 .. 255) ??...........................................b12-97c7--317d7

Go start the battle.........................................................................b11-99b5--2d9c5
Start of battle?............................................................................b11-99b8--2d9c8
Set up the enemy party......................................................................b11-99e0--2d9f0
Go start the battle.........................................................................b11-99e5--2d9f5
Start of battle?............................................................................b11-9a00--2da10
Start battle here???........................................................................b12-9306--31316

Set player postures.........................................................................b12-9e6a--31e7a
Set player postures.........................................................................b12-aa50--32a60
Generate enemy..............................................................................b11-a35d--2e36d
Generate enemy..............................................................................b11-a379--2e389
Generate enemy..............................................................................b11-a395--2e3a5
Generate enemy..............................................................................b11-a3ad--2e3bd
Generate enemy..............................................................................b11-a3b3--2e3c3

Set up the enemy party......................................................................b11-a12a--2e13a
Clear enemy slots...........................................................................b11-a137--2e147
Battle number; bit 7 is first/second formation select.......................................b11-a141--2e151
If battle is second formation, copy second-form.............................................b11-a146--2e156
Min/Max into first formation position and zero..............................................b11-a149--2e159
The enemy 3 & 4 fields......................................................................b11-a14c--2e15c

Get battle formation........................................................................b11-a168--2e178
Get # enemy sizes possible in this formation................................................b11-a183--2e193
Get enemies, and their palettes and pictures................................................b11-a194--2e1a4
Formation 0 (9 small) or 1 (4 large)........................................................b11-a17e--2e18e
9 small monsters............................................................................b12-9ff7--32007
4 big.......................................................................................b12-a000--32010
2 big, 6 small..............................................................................b12-a004--32014
Get tilemap.................................................................................b11-a282--2e292
Formation 2 (2 large & 6 small).............................................................b11-a32f--2e33f
Formation 3 (Fiend).........................................................................b11-a275--2e285
Formation 4 (Chaos).........................................................................b11-a2e5--2e2f5

Monster type in this slot...................................................................b12-9ada--31aea
Monster type in this slot...................................................................b12-9adf--31aef
Monster type in this slot...................................................................b12-9b09--31b19
Monster type in this slot...................................................................b12-9b33--31b43
Monster type in this slot...................................................................b12-a1ea--321fa
Monster type in this slot...................................................................b12-a1f3--32203


GROUP SIZES
Choose # of this enemy......................................................................b11-a20d--2e21d
Detect enemy size...........................................................................b11-a22a--2e23a
Starting slot # for small enemies...........................................................b11-a336--2e346
# slots for large enemies...................................................................b11-a33b--2e34b
# slots for small enemies...................................................................b11-a340--2e350
Large enemy.................................................................................b11-a3be--2e3ce
Get a random number min/max.................................................................b11-a3c3--2e3d3
Get enemy index number......................................................................b11-a3da--2e3ea
Store enemy index number into slot..........................................................b11-a3e7--2e3f7
Small enemy.................................................................................b11-a3fe--2e40e
Inc enemy counter?..........................................................................b11-a3f1--2e401
Get a random number min/max.................................................................b11-a403--2e413
Get enemy index number......................................................................b11-a41a--2e42a
Get slot....................................................................................b11-a41d--2e42d
Store index number into slot................................................................b11-a423--2e433
Inc enemy counter?..........................................................................b11-a42d--2e43d


BATTLE INITIALIZE
Pointer to battle data in RAM...............................................................b11-a160--2e170
Pointer to battle data in RAM...............................................................b11-a160--2e170
Data, shuffled in RAM for battle order......................................................b12-a15c--2e16c

Initialize players for battle...............................................................b12-9321--31331
Relocated routine for weapon bug fix........................................................b12-9321--31331
Battle surprise factor?.....................................................................b12-93f3--31403
Pointer to data for weapon..................................................................b12-96d6--316e6
Enable screen...............................................................................b12-9732--31742
Alternate entry point, that skips setting up some memory stuff..............................b12-9773--31783
Enable screen...............................................................................b12-978a--3179a
Enable screen...............................................................................b12-a079--32089
Is player? Process command..................................................................b12-a1af--321bf

Player......................................................................................b12-a357--32367
Player command..............................................................................b12-a35e--3236e
All this must involve getting the player's commands.........................................b12-9420--32430
Player indicator in $6c89...................................................................b12-a556--32566
Clear player command for this round.........................................................b12-a9f9--32a09
Table for setting up monster in-RAM struct..................................................b12-afcb--32fdb
Data, shuffled in RAM for battle order......................................................b12-a15c--3216c

Initialize monsters for battle..............................................................b12-9306--31316
Execute a round of battle...................................................................b12-9452--31462
Execute a round of battle...................................................................b12-a169--32179
Determine battle order: take list above and do 17 random swaps..............................b12-a169--32179

Load status.................................................................................b12-a3bd--323cd
Target status...............................................................................b12-a1a9--321b9
Target status...............................................................................b12-a1db--321eb
Target index................................................................................b12-a1e7--321f7
Target index................................................................................b12-a200--32210

Player strike first? skip monster...........................................................b12-a1b9--321c9
Clear strike first..........................................................................b12-a1d4--321e4
Player strike first.........................................................................b12-93c9--313d9
Player strike first.........................................................................b12-9412--31422


ATTACKER
Attacker damage.............................................................................b12-a4e4--324f4
w[1] = attacker damage......................................................................b12-a694--326a4
Min 1 damage................................................................................b12-a838--32848

Draw attacker name..........................................................................b12-b05e--3206e
Attacker type (0=player, 1=monster).........................................................b12-a1e2--321f2
Attacker type (0=player, 1=monster).........................................................b12-a4dd--324ed
Attack!.....................................................................................b12-a366--32376
Attack!.....................................................................................b12-a4ba--324ca
Attacker index..............................................................................b12-a4bc--324cc
Target index................................................................................b12-a4c2--324d2

Perform a battle action.....................................................................b12-a1bf--321cf
Perform a battle action.....................................................................b12-a352--32362
Perform attack for each combatant...........................................................b12-a1a4--321b4

Do physical attack..........................................................................b12-a55e--3256e
Do physical attack..........................................................................b12-a67b--3268b
Do attack sparkles..........................................................................b12-a1fe--3220e

Attacker category attack....................................................................b12-a4eb--324fb
Attacker element............................................................................b12-a4f2--32502
Attacker status.............................................................................b12-a515--32525
Save new attacker status....................................................................b12-a577--32587
If attacker dark, w[0]-=40..................................................................b12-a6a0--326b0
Chance to apply status: 100, or 0 if strong.................................................b12-a869--32879
Display message about status applied to player..............................................b12-a988--32998

Attacker hit%...............................................................................b12-a4f9--32509
w[0]+=attacker hit% (clamp 255).............................................................b12-a71f--3272f
w[2]=attacker #hits * hit multiplier, min 1.................................................b12-a761--32771
Attacker hit multiplier.....................................................................b12-a500--32510
Attacker #hits..............................................................................b12-a507--32517
Attacker Critical %.........................................................................b12-a50e--3251e
w[6] = attacker critical %..................................................................b12-a69a--326aa
Otherwise, alter hit chance.................................................................b12-a71d--3272d
If w[6]>w[0], w[6]=w[0] (crit chance always <= hit chance)..................................b12-a753--32763
Mark hit....................................................................................b12-a83b--3284b
If roll <= critical chance, critical........................................................b12-a83e--3284e
Mark critical...............................................................................b12-a84e--3285e
Add damage for this hit into total damage...................................................b12-a851--32861
Tries even on misses after the first successful hit.........................................b12-a864--32874

Attacker weapon GFX.........................................................................b12-a51c--3252c
Attacker weapon palette.....................................................................b12-a523--32533


TARGET
Target status...............................................................................b12-a52a--3253a
Target category.............................................................................b12-a531--32541
Target elemental weakness...................................................................b12-a538--32548
Save new target status......................................................................b12-a563--32573
If target dark, w[0]+=40....................................................................b12-a6b0--326c0
If category or element hit..................................................................b12-a6c0--326d0
if target stopped or asleep, damage*=5/4 and don't alter hit chance.........................b12-a700--32710

Target HP...................................................................................b12-a54d--3255d
Save new target HP..........................................................................b12-a568--32578
Target absorb...............................................................................b12-a546--32556
Subtract target absorb......................................................................b12-a81b--3282b
Target evade %..............................................................................b12-a53f--3254f
w[0]-=target evade (clamp 0)................................................................b12-a734--32744

No, is it a live monster?...................................................................b12-a1b1--321c1
Empty slot, skip it.........................................................................b12-a1b7--321c7
Check if target dead, may not return here...................................................b12-a1c5--321d5
Check if target dead........................................................................b12-a1db--321eb


MAGIC / DRINK / ITEM
Draw spell name.............................................................................b12-b074--33084
Try to cure stop 9.8%.......................................................................b12-b1c3--331d3
Magic.......................................................................................b12-a3a1--323b1
Magic.......................................................................................b12-b3c5--333d5
Do player magic command.....................................................................b12-b40a--3341a
Cast Spell!.................................................................................b12-b7cd--337dd
Subtract a magic charge.....................................................................b12-a3a8--323b8
Drink.......................................................................................b12-a371--32381
Drink.......................................................................................b12-b3bd--333cd
Use drink...................................................................................b12-a378--32388
Item........................................................................................b12-a38b--3239b
Item........................................................................................b12-b3b5--333c5


MONSTER ATTACK
Monster strike first........................................................................b12-9405--31415
Enemy attack................................................................................b12-a581--32591
Enemy attack variables, similar to above....................................................b12-a583--32593
If monster and monster has attack effect and hit, do it.....................................b12-a85a--3286a
Attack effect...............................................................................b12-a85f--3286f

Enemy choose attack.........................................................................b12-b2a2--332b2
Choose a random warrior (#1 50%, #2 25%, #3 12.5%, #4 12.5%)................................b12-b325--33335
Confused attack.............................................................................b12-b21a--3322a
Non-confused enemy logic....................................................................b12-b22b--3323b


IN BATTLE STATUS EFFECTS
Warrior status..............................................................................b15-df16--3df26
If player poison/stop/sleep, set crouch?....................................................b12-9dc9--31dd9
Display message about status applied to player..............................................b12-a988--32998
Handle warrior 1-4 poison...................................................................b12-a2a8--322b8
Handle warrior poison.......................................................................b12-a2c3--322d3
Poisoned?...................................................................................b12-a2d0--322e0
HP-=2.......................................................................................b12-a2d7--322e7
Dead from poison?...........................................................................b12-a300--32310

Try to cure stop/sleep......................................................................b12-a3b8--323c8
Wake player?................................................................................b12-a42f--3243f
Wake if (0..80)<MaxHP.......................................................................b12-a437--32447
Clear sleep status..........................................................................b12-a46c--3247c
Unstop player?..............................................................................b12-a481--32491
25% chance to unstop........................................................................b12-a48c--3249c
Clear stop status in both structs...........................................................b12-a495--324a5
Player dead/stone flags.....................................................................b12-9819--31829
Copy dead/stoned flag.......................................................................b14-9946--39956

Handle regenerative monsters................................................................b12-a232--32242
Handle regenerative monsters................................................................b12-a2bd--322cd
Regenerative?...............................................................................b12-a252--32262
HP+=3, clamp to max.........................................................................b12-a25a--3226a

Slain.......................................................................................b11-9af5--2db05
Is dead? return.............................................................................b11-9bcb--2dbdb
If player dead, zero the current HP.........................................................b12-9dba--31dca
Restart the game............................................................................b12-935a--3136a

If HP < MaxHP/4, set crouch?................................................................b12-9dd6--31de6
Otherwise, set no crouch?...................................................................b12-9dfb--31e0b
Player A: Dead -> 0HP, and set crouch/not crouch............................................b12-9778--31788
Player A: Dead -> 0HP, and set crouch/not crouch............................................b12-9db2--31dc2
Player A: Dead -> 0HP, and set crouch/not crouch............................................b12-9e16--31e26
Player A: Dead -> 0HP, and set crouch/not crouch............................................b12-9ec5--31ed5


BATTLE END
Clear unused in-battle enemy structs........................................................b11-a32c--2e33c
Clear unused in-battle enemy structs........................................................b11-a4c6--2e4d6
Clear unused in-battle enemy structs........................................................b11-a585--2e595
Clear unused in-battle enemy structs........................................................b11-a6c6--2e6d6
Clear unused in-battle enemy structs........................................................b11-a7b9--2e7c9

Check for won/lost battle...................................................................b12-a2c0--322d0
Won? set flag and return two levels.........................................................b12-a21e--3222e
Wiped out? set flag and return two levels...................................................b12-a20d--3221d
Beat Chaos (battle 7b)?.....................................................................b11-9ad3--2dae3

Ran away?...................................................................................b11-9acb--2dadb
Run!........................................................................................b12-a3d8--323e8
Run!........................................................................................b12-a422--32432
Run variables?..............................................................................b12-a3f0--32400
Player strike first -> always run...........................................................b12-a3e0--323f0
Chance to run: Luck > (0..Level+15).........................................................b12-a3ec--323fc
Can't run...................................................................................b12-a41d--3242d
Can't run flag -> no surprise either........................................................b12-93cf--313df
Can't run flag -> never run.................................................................b12-a3e5--323f5
Set flag and return two levels..............................................................b12-a427--32437

Do post-round handling (e.g. poison)........................................................b12-a1d7--321e7
Post-round handling (e.g. poison)...........................................................b12-a2a6--322b6
Status priorities, lowest number goes on top................................................b12-ac92--32ca2
Do poison step damage.......................................................................b15-c342--3c352
Do poison step damage.......................................................................b15-c7fb--3c80b
Do poison step damage.......................................................................b15-cc92--3cca2

Rearrange warriors based on statuses........................................................b12-92e0--312f0
Rearrange warriors based on statuses........................................................b12-ac96--32ca6
Get reordering screen buttons...............................................................b14-99dd--399ed
Set cursor for reordering screen............................................................b14-9b2d--39b3d
Setup sprites for reordering screen.........................................................b14-9b54--39b64
Data for party order screen.................................................................b14-9b71--39b81
Output names for reordering.................................................................b14-9975--39985
Output names for reordering.................................................................b14-9af8--39b08
Output names for reordering screen..........................................................b14-9b91--39ba1
Output name of warrior in A.................................................................b14-9c2a--39c3a


BATTLE BACKGROUND
Battle backdrop pattern.....................................................................b15-f3b1--3f3c1
Battle backdrop assignment..................................................................b00-b300--03310
Battle backdrop palettes....................................................................b00-b200--03210
Battle generic palette map..................................................................b15-f400--3f410
Load battle palettes........................................................................b15-f471--3f481
Battle window coordinates?..................................................................b15-f9e9--3f9f9
Command menu text coordinates...............................................................b15-fa20--3fa30


GRAPHICS AND PALETTES
Graphics related?...........................................................................b12-9316--31326
Setup player graphics?......................................................................b12-931e--3132e
Setup player graphics?......................................................................b12-9724--31734
Low bit of graphic is size flag.............................................................b11-a3ba--2e3ca
Get graphic - all except first slot must be 0...............................................b11-a278--2e288
Get graphic for 1st enemy...................................................................b11-a34e--2e35e
Get graphic for 2nd enemy...................................................................b11-a36c--2e37c
Get graphic for 3rd enemy...................................................................b11-a38a--2e39a
Get graphic for 4th enemy...................................................................b11-a3a4--2e3b4
Bits 6-7 are GFX, bit 0 is palette (?)......................................................b11-a3ed--2e3fd
Bits 6-7 are GFX, bit 0 is palette (?)......................................................b11-a429--2e439
set GFX and do animation?...................................................................b12-9e70--31e80
set GFX and do animation?...................................................................b12-a349--32359
Load palette and do GFX?....................................................................b12-a32d--3233d
Load palette?...............................................................................b12-a33f--3234f
Get palette color selection for 1st enemy...................................................b11-a343--2e353
Get palette color selection for 2nd enemy...................................................b11-a360--2e370
Get palette color selection for 3rd enemy...................................................b11-a37c--2e38c
Get palette color selection for 4th enemy...................................................b11-a398--2e3a8
palette?....................................................................................b11-a7fc--2e80c
clear screen (tile 0 pal 3).................................................................b14-9c02--39c12


BATTLE MESSAGE
Battle message text.........................................................................b11-8c40--2cc50
Battle message text.........................................................................b11-8fec--2cffc
Battle message text.........................................................................b12-84c0--304d0
Battle message text pointer table...........................................................b11-8f50--2cf60



******************************************************---X7---***********************************************************
*************************************************************************************************************************

_______________________________________________________-Maps-____________________________________________________________
_________________________________________________________________________________________________________________________


OVERWORLD
Overworld map data..........................................................................b01-8200--04210
World Map tiles.............................................................................b02-8000--08010
World map tile data.........................................................................b00-8000--00010
World map pattern table assignment..........................................................b00-8100--00110
World map: $53=current tile, $52=tile data high 2 bits......................................b15-c696--3c6a6
World map palette assignments...............................................................b00-8300--00310
World map palettes..........................................................................b00-8380--00390

Overworld map row pointers..................................................................b01-8000--04010
Decompress 2 world map rows.................................................................b01-bf40--07f50
Decompress row..............................................................................b01-bf5d--07f6d
Get row pointer.............................................................................b01-bf42--07f43
Inc data pointer and loop...................................................................b01-bf86--07f96
Inc data ptr................................................................................b01-bf6d--07f7d
Get repeat count, and write that many copies................................................b01-bf73--07f83
Write last/only copy........................................................................b01-bf82--07f92
Repeat all the above for the next row.......................................................b01-bf8f--07f9f

Battle probability lookup table.............................................................b15-c58c--3c59c
Set scrolling for map?......................................................................b15-cca1--3ccb1
Various map related stuff...................................................................b15-cda1--3cdb1


STANDARD
Map tiles...................................................................................b03-8000--0c010
Map offsets from this address...............................................................b04-8000--10010
Map data, as pointed to above for offsets 0080 to 3fff......................................b04-8080--10090
Map data, as pointed to from b04 offsets 4000 to 7fff.......................................b05-8000--14010
Map data, as pointed to from b04 offsets 8000 to bfff.......................................b06-8000--18010

Map tile data...............................................................................b00-8800--00810
Map tileset selection.......................................................................b00-acc0--02cd0
Map tileset pattern table...................................................................b00-9000--01010
Map tileset palette assignments.............................................................b00-8400--00410
Map palettes................................................................................b00-a000--02010
Load map tile, pattern, palette map, and palettes...........................................b15-cc08--3cc18


COORDS
Overworld->map teleport X coords............................................................b00-ac00--02c10
Overworld->map teleport Y coords............................................................b00-ac20--02c30
Overworld->map teleport map #...............................................................b00-ac40--02c50
Enter map from world map....................................................................b15-c1dc--3c1ec

Map->world map teleport X coords............................................................b00-ac60--02c70
Map->world map teleport Y coords............................................................b00-ac70--02c80

Map->map teleport X coords..................................................................b00-ad00--02d10
Map->map teleport Y coords..................................................................b00-ad40--02d50
Map->map teleport map #.....................................................................b00-ad80--02d90


SPRITES
Map sprites.................................................................................b00-b400--03410
Initial sprite visibilities, event flags, Treasure Chest Opened Flags.......................b00-af00--02f10
Starting positions, visibilities............................................................b00-b000--03010

Sprite visibilities and behavior............................................................b14-94f0--39500
Sprite behavior routines (plot points)......................................................b14-9296--392a6
Decide if a sprite should start moving......................................................b15-e50a--3e51a
Load sprite structs.........................................................................b15-e7eb--3e7fb
Sprite stuff?...............................................................................b15-e8fa--3e90a
Set warrior A sprite at ($40,$41)...........................................................b15-ebfd--3ec0d

Player map graphics.........................................................................b02-9000--09010
Map sprite picture assignment...............................................................b00-ae00--02e10
Map sprite graphics.........................................................................b02-a200--0a210
Colors for index 2 of the map character palettes............................................b00-83a0--003b0
Hide sprite Y, ID number in A...............................................................b14-9273--39283

Treasures...................................................................................b00-b100--03110
Open treasure chest in $45..................................................................b15-cc05--3cc15
Open treasure chest in $45..................................................................b15-dd78--3dd88
Open or close door, depending on $0d flags..................................................b15-cc85--3cc95


DOMAIN
Battle Domain Data..........................................................................b11-8000--2c010
Map battle frequencies?.....................................................................b11-8c00--2cc10
Random battle or spiked square..............................................................b15-cdc3--3cdd3
More domain data............................................................................b15-c47d--3c48d


B SELECT MAP TILES
B+Select pattern table (lots to read here)..................................................b09-b000--27010
Tile to each row of the tile................................................................b09-bcd9--27ce9
Prepare the "Final Fantasy" tiles for upload................................................b09-bb4e--27b5e
Prepare the "Final Fantasy" tiles for upload................................................b09-bc13--27c23
Upload the "Final Fantasy" tiles............................................................b09-bb00--27b10
Upload the "Final Fantasy" tiles............................................................b09-bc48--27c58
Start of each tile of the "Final Fantasy" text..............................................b09-bb8a--27b9a
B+Select world map "Final" text.............................................................b09-b700--27710
B+Select world map "Fantasy" text...........................................................b09-b800--27810


CRESTS
B+Select map crests.........................................................................b09-b400--27410
Tile set for the start of each tile of the crest graphics...................................b09-bce9--27cf9
Prepare the crest tiles for upload..........................................................b09-bc10--27c20
Prepare the crest tiles for upload..........................................................b09-bca3--27cb3
Upload the crests...........................................................................b09-bc45--27c55
Upload the crests...........................................................................b09-bc55--27c65


B SELECT MAP CONSTRUCTION
Do the B+Select Map.........................................................................b09-bc00--27c10
Upload the data to the PPU?.................................................................b09-bc19--27c29
Upload the data to the PPU?.................................................................b09-be54--27b64
Upload the map?.............................................................................b09-bc3a--27c4a
Upload the map?.............................................................................b09-bd91--27da1
Construct the actual map....................................................................b09-bde7--27df7
Decompress 2 world map rows.................................................................b09-bde7--27df7
Combine a 2x2 square of map ................................................................b09-bdf0--27e00
Build the bytes for the tile................................................................b09-be08--27e18
Clear sprites, and set "you are here" sprite for B+Select map...............................b09-bc16--27c26
Clear sprites, and set "you are here" sprite for B+Select map...............................b09-bf34--27f44

You are here" indicator for B+Select map....................................................b09-bf00--27f10
You are here and dot indicator..............................................................b09-beeb--27efb
Upload sprites..............................................................................b09-bece--27ede
Clear sprites, and set "you are here".......................................................b09-bf34--27f44
Check "flashing dot" flag...................................................................b09-be0e--27e1e
Dot" for B+Select map?......................................................................b09-bf10--27f20
Something to do with the flashing dots......................................................b09-be11--27e21
Something to do with the flashing dots......................................................b09-be30--27e40
Alternating white and black squares.........................................................b09-ba00--27a10
Upload the data to the PPU?.................................................................b09-be54--27e64


GRAPHICS AND PALETTES
B+Select map colors for each world map tile.................................................b09-bf80--27f90
Wait for the button press and cycle palette?................................................b09-bc4b--27c5b
Wait for the button press and cycle palette?................................................b09-bd49--27b59
Upload palettes.............................................................................b09-bd51--27d61
Upload palettes.............................................................................b09-bed3--27ee3
Palettes?...................................................................................b09-bf20--27f30

OTHER
Do damage square damage.....................................................................b15-c7de--3c7ee
Do damage square damage.....................................................................b15-cc9d--3ccad
Generic can walk here.......................................................................b15-cde4--3cdf4
Need key item to walk here..................................................................b15-cde6--3cdf6



******************************************************---X8---***********************************************************
*************************************************************************************************************************

_______________________________________________________-Shop-____________________________________________________________
_________________________________________________________________________________________________________________________



SHOP
Shops.......................................................................................b14-838e--3839e
Shop pointers...............................................................................b14-8300--38310
Shop handling routine pointers..............................................................b14-a320--3a330
Shop types..................................................................................b15-ebb5--3ebc5

Item Prices.................................................................................b13-bc00--37c10
Weapon Prices...............................................................................b13-bc38--37c48
Armor Prices................................................................................b13-bc88--37c98
Magic Prices................................................................................b13-bd60--37d70
Gold prices.................................................................................b13-bcd8--37ce8

Weapon/Armor shop routine...................................................................b14-a3b4--3a3c4
Magic Shop routine..........................................................................b14-a360--3a370
Item Shop routine...........................................................................b14-a472--3a482
Inn routine.................................................................................b14-a508--3a518
Clinic routine..............................................................................b14-a5a2--3a5b2
More shop routine...........................................................................b15-ecb9--3ecc9

Give Warrior in $62 the weapon/armor (which in $66) in $030c, C set if no room..............b14-a61d--3a62d
Draw warriors in shop.......................................................................b14-a727--3a737
Load shop wares and draw screen.............................................................b14-a778--3a788
Draw wares menu and get selection...........................................................b14-a857--3a867

Do Buy/Sell/Exit............................................................................b14-a8d3--3a8e3
Do Buy/Sell menu............................................................................b14-a8b1--3a8c1
Do yes/no menu..............................................................................b14-a8c2--3a8d2
Do shop main menu...........................................................................b14-a907--3a917
Do shop wares menu..........................................................................b14-a912--3a922

Shop texts..................................................................................b14-804c--3805c
Shop text pointers..........................................................................b14-8000--38010

Cursor positions for shop main menu.........................................................b14-a977--3a987
Cursor position for shop wares menu.........................................................b14-a97f--3a98f
Draw warriors in shop.......................................................................b14-a9fa--3aa0a
Draw shop text..............................................................................b14-aa26--3aa36
Draw/load shop window.......................................................................b14-aa3b--3aa4b
Shop window coordinates.....................................................................b14-ac40--3ac50

Shop tile offsets (data in bank 09).........................................................b14-ac54--3ac64
Shop display pattern table..................................................................b14-ac9c--3acac
Shop graphics...............................................................................b09-8000--24010
Shop palette map............................................................................b14-ac5c--3ac6c
Shop palettes...............................................................................b00-b240--03250
General shop palettes.......................................................................b15-eb74--3eb84










